﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="DetailInfo.aspx.cs" Inherits="Fitment.Budget.DetailInfo" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
    
        <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
            DataKeyNames="Door_ID" DataSourceID="SqlDataSource1">
            <Columns>
                <asp:CommandField ShowEditButton="True" />
                <asp:BoundField DataField="Door_ID" HeaderText="Door_ID" InsertVisible="False" 
                    ReadOnly="True" SortExpression="Door_ID" />
                <asp:BoundField DataField="Room_ID" HeaderText="Room_ID" 
                    SortExpression="Room_ID" />
                <asp:BoundField DataField="Mat_ID" HeaderText="Mat_ID" 
                    SortExpression="Mat_ID" />
                <asp:BoundField DataField="DoorHeight" HeaderText="DoorHeight" 
                    SortExpression="DoorHeight" />
                <asp:BoundField DataField="DoorLength" HeaderText="DoorLength" 
                    SortExpression="DoorLength" />
            </Columns>
        </asp:GridView>
        <asp:GridView ID="GridView2" runat="server" AutoGenerateColumns="False" 
            DataKeyNames="Wind_ID" DataSourceID="SqlDataSource2">
            <Columns>
                <asp:CommandField ShowEditButton="True" />
                <asp:BoundField DataField="Wind_ID" HeaderText="Wind_ID" InsertVisible="False" 
                    ReadOnly="True" SortExpression="Wind_ID" />
                <asp:BoundField DataField="Room_ID" HeaderText="Room_ID" 
                    SortExpression="Room_ID" />
                <asp:BoundField DataField="Mat_ID" HeaderText="Mat_ID" 
                    SortExpression="Mat_ID" />
                <asp:BoundField DataField="WindHeight" HeaderText="WindHeight" 
                    SortExpression="WindHeight" />
                <asp:BoundField DataField="WindLength" HeaderText="WindLength" 
                    SortExpression="WindLength" />
            </Columns>
        </asp:GridView>
        <asp:Button ID="Button1" runat="server" onclick="Button1_Click" Text="下一步" />
        <br />
        <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
            ConnectionString="<%$ ConnectionStrings:FitmentConnectionString %>" 
            DeleteCommand="DELETE FROM [DoorInfo] WHERE [Door_ID] = @Door_ID" 
            InsertCommand="INSERT INTO [DoorInfo] ([Room_ID], [Mat_ID], [DoorHeight], [DoorLength]) VALUES (@Room_ID, @Mat_ID, @DoorHeight, @DoorLength)" 
            SelectCommand="SELECT * FROM [DoorInfo]" 
            UpdateCommand="UPDATE [DoorInfo] SET [Room_ID] = @Room_ID, [Mat_ID] = @Mat_ID, [DoorHeight] = @DoorHeight, [DoorLength] = @DoorLength WHERE [Door_ID] = @Door_ID">
            <DeleteParameters>
                <asp:Parameter Name="Door_ID" Type="Int32" />
            </DeleteParameters>
            <UpdateParameters>
                <asp:Parameter Name="Room_ID" Type="Int32" />
                <asp:Parameter Name="Mat_ID" Type="Int32" />
                <asp:Parameter Name="DoorHeight" Type="Int16" />
                <asp:Parameter Name="DoorLength" Type="Int16" />
                <asp:Parameter Name="Door_ID" Type="Int32" />
            </UpdateParameters>
            <InsertParameters>
                <asp:Parameter Name="Room_ID" Type="Int32" />
                <asp:Parameter Name="Mat_ID" Type="Int32" />
                <asp:Parameter Name="DoorHeight" Type="Int16" />
                <asp:Parameter Name="DoorLength" Type="Int16" />
            </InsertParameters>
        </asp:SqlDataSource>
        <br />
        <asp:SqlDataSource ID="SqlDataSource2" runat="server" 
            ConnectionString="<%$ ConnectionStrings:FitmentConnectionString %>" 
            DeleteCommand="DELETE FROM [WindowInfo] WHERE [Wind_ID] = @Wind_ID" 
            InsertCommand="INSERT INTO [WindowInfo] ([Room_ID], [Mat_ID], [WindHeight], [WindLength]) VALUES (@Room_ID, @Mat_ID, @WindHeight, @WindLength)" 
            SelectCommand="SELECT * FROM [WindowInfo]" 
            UpdateCommand="UPDATE [WindowInfo] SET [Room_ID] = @Room_ID, [Mat_ID] = @Mat_ID, [WindHeight] = @WindHeight, [WindLength] = @WindLength WHERE [Wind_ID] = @Wind_ID">
            <DeleteParameters>
                <asp:Parameter Name="Wind_ID" Type="Int32" />
            </DeleteParameters>
            <UpdateParameters>
                <asp:Parameter Name="Room_ID" Type="Int32" />
                <asp:Parameter Name="Mat_ID" Type="Int32" />
                <asp:Parameter Name="WindHeight" Type="Int16" />
                <asp:Parameter Name="WindLength" Type="Int16" />
                <asp:Parameter Name="Wind_ID" Type="Int32" />
            </UpdateParameters>
            <InsertParameters>
                <asp:Parameter Name="Room_ID" Type="Int32" />
                <asp:Parameter Name="Mat_ID" Type="Int32" />
                <asp:Parameter Name="WindHeight" Type="Int16" />
                <asp:Parameter Name="WindLength" Type="Int16" />
            </InsertParameters>
        </asp:SqlDataSource>
    
    </div>
    </form>
</body>
</html>
